package main

import (
	"math"
	"fmt"
)

type Point struct{x,y float64}

func (p *Point) Abs() float64 {
	return math.Sqrt(p.x*p.x + p.y*p.y)
}

func (p *Point) Scale(factor float64) {
	p.x *= factor
	p.y *= factor
}

func main() {
	p:=Point{3,4}
	fmt.Println(p.Abs())

	p.Scale(10)
	fmt.Println(p.Abs())
}
